#pragma once

#define SAFE_DELETE(p)				{ if(p) { delete (p);     (p)=NULL; } }
#define SAFE_DELETE_ARRAY(p)	{ if(p) { delete[] (p);   (p)=NULL; } }
#define SAFE_RELEASE(p)				{ if(p) { (p)->Release(); (p)=NULL; } }

#include <d3d11.h>
#include <d3dx11.h>
#include <d3d11shader.h>
#include <D3Dcompiler.h>
#include <xnamath.h>

#include <DxErr.h>

#ifndef V
#define V(x) { hr = (x); if( FAILED(hr) ) { MessageBox(NULL,L#x,L"Error",0x00020000L); exit(1);} }
#endif
#ifndef V_RETURN
#define V_RETURN(x) { hr = (x); if( FAILED(hr) ) { MessageBox(NULL,L#x,L"Error",0x00020000L); exit(1);} }
#endif

#ifdef SIMPLEDLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif

#pragma warning( disable:4251 )

#include <vector>
#include <list>
